package com.glc.hms;

import com.glc.hms.common.util.FileResolver;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
@ComponentScan(basePackages = {"com.glc"})
@SpringBootApplication
public class HmsadminApplication {

	//启动类
	public static void main(String[] args) {
		SpringApplication.run(HmsadminApplication.class, args);
	}


    @Value("${hsm.fileUpload.tempPath}")
    private String tempPath;
    @Value("${hsm.fileUpload.uploadPath}")
    private String uploadPath;
    @Value("${hsm.fileUpload.fileWebUrl}")
    private String fileWebUrl;
    @Value("${hsm.img.default.spec:60X60,100X100,160X160,200X60,220X220,380X380,640X640}")
    private String imgSpec;

    @Bean
    public FileResolver fileResolver(){
        return new FileResolver(tempPath, uploadPath, fileWebUrl, imgSpec);
    }
}
